<?php 
//作业2：编写PHP文件下载处理功能

 ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8" />
 	<title>Document</title>
 </head>
 <body>
 	<table border="1" cellspacing="" cellpadding="">
 		<?php foreach(glob('./download/*') as $v): ?>
	 		<tr>
	 			<td><?php echo basename($v) ?></td>
	 			<td>
	 				<a href="./download.php?file=<?php echo $v ?>">下载</a>
	 			</td>
	 		</tr>
 		<?php endforeach ?>
 	</table>
 </body>
 </html>